package com.stalltea.leetcode;

/**
 * @author yilvchangfa
 * @since 2021/12/15 09:29
 **/
public class LongestSubstringWithoutRepeatingCharacters {

    public int lengthOfLongestSubstring(String s) {
        int subStringLength = 1;
        char[] subStringArray = new char[5 * 1000];
        StringBuilder stringBuilder = new StringBuilder();
        int i = 0;
        char[] stringArray = s.toCharArray();
        for (; i < stringArray.length; i++) {
            for (int j = 0; j < subStringArray.length; j++) {
                if (stringArray[i] == subStringArray[j]) {
                    subStringLength= subStringArray.length;
                    break;
                }
            }
        }
        return subStringLength;
    }

}
